home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / text / hyper / htmledit.lha / HTMLEdit / rexx / LoadToIBrowse.hrx < prev    next >
Text File  |  1999-01-04  |  758b  |  41 lines

  1. /*
  2. **
  3. ** Load To IBrowse - ARexx script for HTMLEditor
  4. ** $VER: LoadToIBrowse.hrx © Adam 'Sherwood' Zaparcinski 
  5. ** This script saves actually edited file and loads this file to IBrowse
  6. ** Tested with IBrowse 1.02 demo
  7. **
  8. */
  9.  
  10. options results
  11. address 'HTMLEDIT.1'
  12.  
  13. /* save edited file */
  14.  
  15. he_save
  16.  
  17. /* get name of file (with path) */
  18.  
  19. he_getfilename
  20. URL=RESULT
  21. URL=INSERT("file:///",URL)
  22.  
  23. /* path to IBrowse should be specified as an argument */
  24. PARSE ARG BROWSERPATH
  25.  
  26. /* check if IBrowse is running and run it if isnt */
  27. IF ~SHOW('P','IBROWSE') THEN DO
  28.   ADDRESS COMMAND
  29.   'RUN >NIL:' BROWSERPATH
  30.   'SYS:rexxc/WaitForPort' IBROWSE
  31.   IF RC>0 THEN DO
  32.      say "No port"
  33.      EXIT 5
  34.   END
  35. END
  36.  
  37. /* now load our file to IBrowse */
  38. ADDRESS IBROWSE
  39. GotoURL URL
  40.  
  41. exit